Skip to content

👌 IMPROVE: Remove unnecessary script dependencies.#56

Closed
TimothyBJacobs wants to merge 1 commit into
CommandCodeAI:masterfrom
TimothyBJacobs:patch-1
Closed

👌 IMPROVE: Remove unnecessary script dependencies.#56
TimothyBJacobs wants to merge 1 commit into
CommandCodeAI:masterfrom
TimothyBJacobs:patch-1

Conversation

@TimothyBJacobs
Copy link
Copy Markdown

These dependencies aren't necessary. The wp-blocks style previously held the styles for core blocks, which the built styles do not depend on. It was also removed in the latest Gutenberg version.

The editor dependencies are always enqueued before the editor assets.

Fixes ahmadawais/create-guten-block#64

These dependencies aren't necessary. The `wp-blocks` style previously held the styles for core blocks, which the built styles do not depend on. It was also removed in the latest Gutenberg version.

The editor dependencies are always enqueued before the editor assets.

 Fixes #55
wp_enqueue_script(
'<% blockNamePHPLower %>-cgb-block-js', // Handle.
plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack.
array( 'wp-blocks', 'wp-i18n', 'wp-element' ), // Dependencies, defined above.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These dependencies are required:

  1. wp-blocks handles block registration & various other block API's
  2. wp-i18n handles translations
  3. wp-element react createElement abstraction

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajitbohra Can you fix this PR?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any updates?! 🤔

Copy link
Copy Markdown
Member

@ahmadawais ahmadawais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at @ajitbohra's comment. I seem to agree with him that certain dependencies are still required.

@ahmadawais ahmadawais changed the title Remove unnecessary script dependencies. 👌 IMPROVE: Remove unnecessary script dependencies. May 27, 2018
@ahmadawais
Copy link
Copy Markdown
Member

This was fixed in #110

@ahmadawais ahmadawais closed this Nov 29, 2018
@ahmadawais
Copy link
Copy Markdown
Member

Thank You! 😇for the contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect dependencies

3 participants